﻿@model PagedList<MeterInfo>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <link href="/css/style.css" rel="stylesheet" type="text/css" />
    <link href="/css/select.css" rel="stylesheet" type="text/css" />
    <link href="/css/frominfostyle.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/js/jquery.js">
    </script>
    <script src="/js/jquery.form.js"></script>
    <script type="text/javascript" src="/js/jquery.idTabs.min.js"></script>
    <script type="text/javascript" src="/js/select-ui.min.js"></script>
    <script language="javascript">
        $(function () {
            //导航切换
            $(".imglist li").click(function () {
                $(".imglist li.selected").removeClass("selected")
                $(this).addClass("selected");
            })
        })
    </script>
    <script type="text/javascript">
        $(document).ready(function () {



            $('#form1').find("select[name='WaterTypeId']").find("option:first").before("<option value=''>请选择</option>");
            $('#form1').find("select[name='WaterTypeId']").find("option:first").attr("selected", true);
            $('#form1').find("select[name='WaterTypeId']").prev().find("em:first").text($('#form2').find("select[name='ReadMeterDate']").find("option:selected").text());


            $('#form1').find("select[name='ReadPersonId']").find("option:first").before("<option value=''>请选择</option>");
            $('#form1').find("select[name='ReadPersonId']").find("option:first").attr("selected", true);
            $('#form1').find("select[name='ReadPersonId']").prev().find("em:first").text($('#form2').find("select[name='ReadPersonId']").find("option:selected").text());



            $('#form1').find("select[name='ReadMatchDateStart']").find("option:first").before("<option value=''>请选择</option>");
            $('#form1').find("select[name='ReadMatchDateStart']").find("option:first").attr("selected", true);
            $('#form1').find("select[name='ReadMatchDateStart']").prev().find("em:first").text($('#form2').find("select[name='ReadMatchDateStart']").find("option:selected").text());




            $('#form1').find("select[name='ReadMatchDateEnd']").find("option:first").before("<option value=''>请选择</option>");
            $('#form1').find("select[name='ReadMatchDateEnd']").find("option:first").attr("selected", true);
            $('#form1').find("select[name='ReadMatchDateEnd']").prev().find("em:first").text($('#form2').find("select[name='ReadMatchDateEnd']").find("option:selected").text());



            $('#form1').find("select[name='FirstArea']").find("option:first").before("<option value=''>请选择</option>");
            $('#form1').find("select[name='FirstArea']").find("option:first").attr("selected", true);
            $('#form1').find("select[name='FirstArea']").prev().find("em:first").text($('#form2').find("select[name='FirstArea']").find("option:selected").text());




            $('#form1').find("select[name='SecondArea']").find("option:first").before("<option value=''>请选择</option>");
            $('#form1').find("select[name='SecondArea']").find("option:first").attr("selected", true);
            $('#form1').find("select[name='SecondArea']").prev().find("em:first").text($('#form2').find("select[name='SecondArea']").find("option:selected").text());






            $(".click").click(function () {
                $(".tip").fadeIn(200);
            });

            $(".tiptop a").click(function () {
                $(".tip").fadeOut(200);
            });

            $(".sure").click(function () {
                $(".tip").fadeOut(100);
            });

            $(".cancel").click(function () {
                $(".tip").fadeOut(100);
            });


            //已抄表修改
            $(".clickfromreadermodify").click(function () {
                $(".tipfromreadermodify").fadeIn(200);
            });

            $(".tiptopfromreadermodify a").click(function () {
                $(".tipfromreadermodify").fadeOut(200);
            });

            $(".surefromreadermodify").click(function () {
                $(".tipfromreadermodify").fadeOut(100);
            });

            $(".cancelfromreadermodify").click(function () {
                $(".tipfromreadermodify").fadeOut(100);
            });

            //抄表查询
            $(".clickfromchangesearch").click(function () {
                $(".tipfromchangesearch").fadeIn(200);
            });

            $(".tiptopfromchangesearch a").click(function () {
                $(".tipfromchangesearch").fadeOut(200);
            });

            $(".surefromchangesearch").click(function () {
                $(".tipfromchangesearch").fadeOut(100);
            });

            $(".cancelfromchangesearch").click(function () {
                $(".tipfromchangesearch").fadeOut(100);
            });

            //删除用户
            $(".clickdel").click(function (del) {
                $(".tipdel").fadeIn(200);
            });

            $(".tiptopdel a").click(function (del) {
                $(".tipdel").fadeOut(200);
            });

            $(".suredel").click(function (del) {
                $(".tipdel").fadeOut(100);
            });

            $(".canceldel").click(function (del) {
                $(".tipdel").fadeOut(100);
            });

        });
    </script>
    <script type="text/javascript">
        $(document).ready(function (e) {
            $(".select1").uedSelect({
                width: 345
            });
            $(".select2").uedSelect({
                width: 167
            });
            $(".select3").uedSelect({
                width: 150
            });
        });
    </script>
</head>
<body>
    <div class="place">
        <span>位置：</span>
        <ul class="placeul">
            <li><a href="#">首页</a></li>
            <li><a href="#">抄表管理</a></li>
            <li><a href="#">已抄表查询</a></li>
        </ul>
    </div>
    <div class="rightinfo">
        <div class="tools">
            <ul class="toolbar">
                <li class="clickfromchangesearch"><span><img src="/images/t10.png" /></span>查询</li>
                <li class="click"><span><img src="/images/t09.png" /></span>导出</li>
                <li class="click"><span><img src="/images/t08.png" /></span>打印</li>

            </ul>

        </div>

        <table class="imgtable">
            <thead>
                <tr>
                    <th>选择</th>
                    <th>用户编号</th>
                    <th>用户姓名</th>
                    <th>区域分布</th>
                    <th>区域名称</th>
                    <th>详细地址</th>
                    <th>用水类别</th>
                    <th>上期底数</th>
                    <th>本期底数</th>
                    <th>用量</th>
                    <th>水损</th>
                    <th>抄表人员</th>
                    <th>抄表日期</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr jsonModel="@(JsonConvert.SerializeObject(item,new JsonSerializerSettings{ReferenceLoopHandling = ReferenceLoopHandling.Ignore}))">
                        <td><input name="" type="checkbox" value="@(item.Id)" /></td>
                        <td>@(item.Customer?.CustomerId)</td>
                        <td height="30px;">@item.Customer.CustomerName</td>
                        <td><a href="#">@item.Customer.FirstArea</a></td>
                        <td>@item.Customer.SecondArea</td>
                        <td>@item.Customer.DetailAddress</td>
                        <td>@item.Customer.WaterType.TypeName</td>
                        <td>@(item.LastShow)</td>
                        <td>@(item.ThisShow)</td>
                        <td>@(item.ThisShow - item.LastShow)</td>
                        <td>@(item.ThisLoseWater)</td>
                        <td>@(item.Customer.EmployeeInfo?.NAME)</td>
                        <td>@(item.ReadMeterDate.ToString("yyyy/MM/dd"))</td>
                    </tr>
                }

            </tbody>
        </table>
        <div class="pagin">
            <div class="message">共<i class="blue">@(Model.TotalItemCount)</i>条记录，共&nbsp;<i class="blue">@(Model.TotalPageCount)&nbsp;</i>页</div>
            @Html.Pager(Model, BaseController.PagerOptions)
        </div>


        <form id="form1">



            <!--已抄表查询-->
            <div class="tipfromchangesearch">
                <div class="tiptopfromchangesearch"><img src="/images/t06.png" /><span>已抄表查询</span><a></a></div>
                <div class="tipinfofromchangesearch">
                    <div class="tiprightfromchangesearch">
                        <dt class="userinfotitfromchangesearch">请输入查询条件</dt>
                        <ul class="seachform">
                            <li>
                                <label>用户编号</label>
                                <input name="CustomerId" type="text" class="scinput" />
                            </li>
                            <li>
                                <label>用户姓名</label>
                                <input name="CustomerName" type="text" class="scinput" />
                            </li>
                            <li>
                                <label>水表编号</label>
                                <input name="MeterNo" type="text" class="scinput" />
                            </li>
                            @Html.Action("_LinkArea", "Common")
                            @Html.Action("_WaterType", "Common", new { id = "addsellssss" })
                            <li class="aclear">
                                <label>抄表日期</label>
                                <div class="vocation">
                                    <select class="select3" name="ReadMatchDateStart">
                                        @{
                                            var dateStart1 = DateTime.Now.AddDays(-DateTime.Now.Day).AddDays(1);
                                            var dateEnd1 = DateTime.Now.AddMonths(1).AddDays(-DateTime.Now.Day);
                                            var tempDate1 = dateStart1;
                                        }
                                        <option value="">请选择</option>
                                        @while (tempDate1 >= dateStart1 && tempDate1 <= dateEnd1)
                                        {
                                            <option value="@(tempDate1.ToString("yyyy/MM/dd"))">@tempDate1.ToString("yyyy年MM月dd日")</option>
                                            tempDate1 = tempDate1.AddDays(1);
                                        }
                                    </select>
                                </div>
                            </li>
                            <li>
                                <label>为止日期</label>
                                <div class="vocation">
                                    <select class="select3" name="ReadMatchDateEnd">
                                        @{
                                            var dateStart = DateTime.Now.AddDays(-DateTime.Now.Day).AddDays(1);
                                            var dateEnd = DateTime.Now.AddMonths(1).AddDays(-DateTime.Now.Day);
                                            var tempDate = dateStart;
                                        }
                                        <option value="">请选择</option>
                                        @while (tempDate >= dateStart && tempDate <= dateEnd)
                                        {
                                            <option value="@(tempDate.ToString("yyyy/MM/dd"))">@tempDate.ToString("yyyy年MM月dd日")</option>
                                            tempDate = tempDate.AddDays(1);
                                        }
                                    </select>
                                </div>
                            </li>
                            <li>
                                <label>抄表人员</label>
                                <div class="vocation">
                                    @Html.Action("_Employees", "Common", new { cssClass = "select3" })
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="tipbtnfromchangesearch">
                    <input name="" type="submit" class="surefromchangesearch" value="搜索" />
                    &nbsp;
                    <input name="" type="button" class="cancelfromchangesearch" value="取消" />
                </div>
            </div>
        </form>


        <script type="text/javascript">
            $('.tablelist tbody tr:odd').addClass('odd');
        </script>
    </div>
</body>
</html>
